﻿using DC2010.Objects;
using DC2010.Objects.Base;
using DC2010.Objects.Data;

namespace DC2010.Effects
{
    public class I_Spell_Fireball_Effect : ActionEffectLogic
    {
        public I_Spell_Fireball_Effect(EffectData ed)
            : base(ed)
        {
            // BASH, HACK, BERZERK, KICK, SWING, CHOP
            ShortName = "SWING";
            LongName = "Swings a weapon.";
            EffectType = EffectType.Instant;
        }

		public override void DoAction(BaseObject aAction, BaseObject aAttacker)
		{
			// Variables should be ready now.
			
			// attackerData = null;
			// victimData = null;

			// attackerInfo = null;
			// victimInfo = null;
			
			// attackerPartyData = null;
			// victimPartyData = null;
			
			// victimTile
			
			SpellInfo siFireBall = Root.I.SpellSystem.GetInfo("SPELL_FIREBALL");
			successfulAttack = AttackWithSpell(Attacker, AttackedParty, pParam, range, siFireBall, pParam.neededMana, ref pParam.experienceGained);
			pChar.Inventory.GetAttackingWeapon().L.DecrementChargesRemaining();			
			
			
			bool b = STRandomBool();
			  if (b)
			  {
				//PrintWithSubstitution("IT COMES UP HEADS", 4, true);
			  }
			  else
			  {
				//PrintWithSubstitution("IT COMES UP TAILS", 4, true);
			  };
			  break;

		}
    }
}
